fix: don't use integer for enums in json encoding#761
fix: don't use integer for enums in json encoding#761yon-mg merged 3 commits intogoogleapis:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 1619 1619
Branches 328 328
=========================================
Hits 1619 1619 Continue to review full report at Codecov.
|
busunkim96
left a comment
There was a problem hiding this comment.
Integers for enums in json encoded requests is not desired.
Out of curiosity is there a doc somewhere stating this? Is it for human readability?
vchudnov-g
left a comment
There was a problem hiding this comment.
Thanks for doing this!
If there is already a unit test that checks the REST request sent out, it would be good to capture this there. But if there isn't, don't worry about it right now; we'll do it later.
|
@busunkim96 Yes, the internal design docs specify this. Essentially, we can't guarantee that the numeric values will be preserved when converting from the Discovery file, so we use the string representations. |
Integers for enums in json encoded requests is not desired.